
<div class="row" >
  <div class="col-lg-8 col-lg-push-2">
    <form class="form form-horizontal" [formGroup]="deptForm">
      <input type="hidden" class="form-control" placeholder="所属机构" id="section_add_org_id" formControlName="orgId" name="orgId">
      <input type="hidden" class="form-control" placeholder="所属机构" id="section_add_org_pId" formControlName="pId" name="pId">
      <div class="one-form-header"></div>
      <div class="one-form-body">
        <div class="row">
          <div class="col-sm-4">
            <div id="dept_add_ZTree" class="ztree" style="max-height: 300px"></div>
          </div>
          <div class="col-sm-8">
            <div class="form-group">
              <label for="section_add_belong" class="col-sm-3 control-label" >所属机构:</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" placeholder="所属机构" id="section_add_belong" required readonly formControlName="orgName" name="orgName">
              </div>
            </div>
            <div class="form-group">
              <label for="section_add_belong" class="col-sm-3 control-label" >所属部门:</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" placeholder="所属部门" id="section_add_dept" readonly formControlName="belongDept" name="belongDept">
              </div>
            </div>
            <div class="form-group">
              <label for="section_add_name" class="col-sm-3 control-label" ><span style="color: red;">*</span> 部门名称:</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" placeholder="部门名称" id="section_add_name" required  formControlName="name" name="name">
                <div *ngIf="formErrors.name" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.name}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="section_add_site" class="col-sm-3 control-label" >站点类型:</label>
              <div class="col-sm-9">
                <select class="multiselect form-control" id="section_add_site" formControlName="siteType" multiple="multiple">
                  <!--<option value="">&#45;&#45; 请选择站点类型 &#45;&#45;</option>-->
                  <!--<option *ngFor="let siteType of siteTypes" [value]="siteType.siteTypeCode">{{siteType.remark}}</option>-->
                </select>
                <!--<div *ngIf="formErrors.siteType" class="has-error">-->
                  <!--<label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.siteType}} </label>-->
                <!--</div>-->
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label" >是否有效:</label>
              <div class="col-sm-9">
                <div class="row">
                  <div class="col-xs-4">
                    <input type="radio" name="isValid" id="section_add_show" value="1" formControlName="isValid" >
                    <label for="section_add_show">
                      有效
                    </label>
                  </div>
                  <div class="col-xs-4">
                    <input type="radio" name="isValid" id="section_add_hide" value="0" formControlName="isValid" >
                    <label for="section_add_hide">
                      无效
                    </label>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="section_add_comment" class="col-sm-3 control-label" >备注:</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" value=" " id="section_add_comment" formControlName="remark" name="remark">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="one-form-footer">
        <div class="pull-right">
          <button class="btn btn-default" type="reset" (click)="cancelAddDepartment()">取消</button>
          <button class="btn btn-success" type="button" [disabled]="deptForm.invalid" (click)="onSubmit()">提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
